﻿using Mr.HttpBodyWrapper;

namespace OAuth
{
    public class OAuthFileParameter
        : IOAuthParameter, IFileParameter
    {
        private FileParameter _inner;

        public OAuthFileParameter(string name, string fileName, byte[] data)
        {
            this._inner = new FileParameter(name, fileName, data);
        }

        public string Name { get { return this._inner.Name; } }

        public string FileName { get { return this._inner.FileName; } }

        public byte[] FileData { get { return this._inner.FileData; } }

        #region IOAuthParameter Members

        public bool NeedSign
        {
            get { return false; }
        }

        public bool InBody
        {
            get { return true; }
        }

        #endregion

        #region IParameter Members

        public string ToParamString()
        {
            return this._inner.ToParamString();
        }

        public string ContentType
        {
            get { return this._inner.ContentType; }
        }

        #endregion
    }
}
